<!-- HTML header for doxygen 1.8.20-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=9"/>
	<meta name="generator" content="Doxygen 1.9.4"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<title>Raspberry Pi Pico SDK: pico_aon_timer</title>
	<!-- <link href="tabs.css" rel="stylesheet" type="text/css"/> -->
	<script type="text/javascript" src="jquery.js"></script>
	<script type="text/javascript" src="dynsections.js"></script>
	<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
	<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
	<link href="doxygen.css" rel="stylesheet" type="text/css" />
	<link href="normalise.css" rel="stylesheet" type="text/css"/>
<link href="main.css" rel="stylesheet" type="text/css"/>
<link href="styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
	<div class="navigation-mobile">
		<div class="logo--mobile">
			<a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a>
		</div>
		<div class="navigation-toggle">
			<span class="line-1"></span>
			<span class="line-2">
				<p>Menu Toggle</p>
			</span>
			<span class="line-3"></span>
		</div>
	</div>
	<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
		<div class="logo">
			<a href="index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
			<span style="display: inline-block; margin-top: 10px;">
				v2.1.0
			</span>
		</div>
		<div class="navigation-footer">
			<img src="logo-mobile.svg" alt="Raspberry Pi">
			<a href="https://www.raspberrypi.com/" target="_blank">By Raspberry Pi Ltd</a>
		</div>
<!-- 		<div class="search">
			<form>
				<input type="search" name="search" id="search" placeholder="Search">
				<input type="submit" value="Search">
			</form>
		</div> -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__pico__aon__timer.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">pico_aon_timer<div class="ingroups"><a class="el" href="group__high__level.html">High Level APIs</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>High Level "Always on Timer" Abstraction.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga32e4d69ae8c5b2048af84cf706b8b997"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__aon__timer.html#ga32e4d69ae8c5b2048af84cf706b8b997">aon_timer_start_with_timeofday</a> (void)</td></tr>
<tr class="memdesc:ga32e4d69ae8c5b2048af84cf706b8b997"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start the AON timer running using the result from the gettimeofday() function as the current time.  <a href="group__pico__aon__timer.html#ga32e4d69ae8c5b2048af84cf706b8b997">More...</a><br /></td></tr>
<tr class="separator:ga32e4d69ae8c5b2048af84cf706b8b997"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1d9876f6ebad5960e8d7928b87d6b8ca"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__aon__timer.html#ga1d9876f6ebad5960e8d7928b87d6b8ca">aon_timer_start</a> (const struct timespec *ts)</td></tr>
<tr class="memdesc:ga1d9876f6ebad5960e8d7928b87d6b8ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start the AON timer running using the specified timespec as the current time.  <a href="group__pico__aon__timer.html#ga1d9876f6ebad5960e8d7928b87d6b8ca">More...</a><br /></td></tr>
<tr class="separator:ga1d9876f6ebad5960e8d7928b87d6b8ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga25e4ac9d9553d35646af544277ca9e4e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__aon__timer.html#ga25e4ac9d9553d35646af544277ca9e4e">aon_timer_start_calendar</a> (const struct tm *tm)</td></tr>
<tr class="memdesc:ga25e4ac9d9553d35646af544277ca9e4e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start the AON timer running using the specified calendar date/time as the current time.  <a href="group__pico__aon__timer.html#ga25e4ac9d9553d35646af544277ca9e4e">More...</a><br /></td></tr>
<tr class="separator:ga25e4ac9d9553d35646af544277ca9e4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaad98990deb5ce061e3cac6ef7cc69fc5"><td class="memItemLeft" align="right" valign="top"><a id="gaad98990deb5ce061e3cac6ef7cc69fc5" name="gaad98990deb5ce061e3cac6ef7cc69fc5"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>aon_timer_stop</b> (void)</td></tr>
<tr class="memdesc:gaad98990deb5ce061e3cac6ef7cc69fc5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stop the AON timer. <br /></td></tr>
<tr class="separator:gaad98990deb5ce061e3cac6ef7cc69fc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa9503489fbd3c6afc1d4e67e3c3ae1dc"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__aon__timer.html#gaa9503489fbd3c6afc1d4e67e3c3ae1dc">aon_timer_set_time</a> (const struct timespec *ts)</td></tr>
<tr class="memdesc:gaa9503489fbd3c6afc1d4e67e3c3ae1dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the current time of the AON timer.  <a href="group__pico__aon__timer.html#gaa9503489fbd3c6afc1d4e67e3c3ae1dc">More...</a><br /></td></tr>
<tr class="separator:gaa9503489fbd3c6afc1d4e67e3c3ae1dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae3b326fe02569768b09f37080f0d85e3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__aon__timer.html#gae3b326fe02569768b09f37080f0d85e3">aon_timer_set_time_calendar</a> (const struct tm *tm)</td></tr>
<tr class="memdesc:gae3b326fe02569768b09f37080f0d85e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the current time of the AON timer to the given calendar date/time.  <a href="group__pico__aon__timer.html#gae3b326fe02569768b09f37080f0d85e3">More...</a><br /></td></tr>
<tr class="separator:gae3b326fe02569768b09f37080f0d85e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga48246c7cd89f2f599f9d3405d1b62185"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__aon__timer.html#ga48246c7cd89f2f599f9d3405d1b62185">aon_timer_get_time</a> (struct timespec *ts)</td></tr>
<tr class="memdesc:ga48246c7cd89f2f599f9d3405d1b62185"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current time of the AON timer.  <a href="group__pico__aon__timer.html#ga48246c7cd89f2f599f9d3405d1b62185">More...</a><br /></td></tr>
<tr class="separator:ga48246c7cd89f2f599f9d3405d1b62185"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5ed3f772e4fcab66dadb7654f1fa47ef"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__aon__timer.html#ga5ed3f772e4fcab66dadb7654f1fa47ef">aon_timer_get_time_calendar</a> (struct tm *tm)</td></tr>
<tr class="memdesc:ga5ed3f772e4fcab66dadb7654f1fa47ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current time of the AON timer as a calendar date/time.  <a href="group__pico__aon__timer.html#ga5ed3f772e4fcab66dadb7654f1fa47ef">More...</a><br /></td></tr>
<tr class="separator:ga5ed3f772e4fcab66dadb7654f1fa47ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6e17d6adde0e3b25c70c04970116ccb8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__aon__timer.html#ga6e17d6adde0e3b25c70c04970116ccb8">aon_timer_get_resolution</a> (struct timespec *ts)</td></tr>
<tr class="memdesc:ga6e17d6adde0e3b25c70c04970116ccb8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the resolution of the AON timer.  <a href="group__pico__aon__timer.html#ga6e17d6adde0e3b25c70c04970116ccb8">More...</a><br /></td></tr>
<tr class="separator:ga6e17d6adde0e3b25c70c04970116ccb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga39dab1da58c2f8178024b233e335d059"><td class="memItemLeft" align="right" valign="top">aon_timer_alarm_handler_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__aon__timer.html#ga39dab1da58c2f8178024b233e335d059">aon_timer_enable_alarm</a> (const struct timespec *ts, aon_timer_alarm_handler_t handler, bool wakeup_from_low_power)</td></tr>
<tr class="memdesc:ga39dab1da58c2f8178024b233e335d059"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable an AON timer alarm for a specified time.  <a href="group__pico__aon__timer.html#ga39dab1da58c2f8178024b233e335d059">More...</a><br /></td></tr>
<tr class="separator:ga39dab1da58c2f8178024b233e335d059"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabfecbe6df690a2a10194920ba7db8d3f"><td class="memItemLeft" align="right" valign="top">aon_timer_alarm_handler_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__aon__timer.html#gabfecbe6df690a2a10194920ba7db8d3f">aon_timer_enable_alarm_calendar</a> (const struct tm *tm, aon_timer_alarm_handler_t handler, bool wakeup_from_low_power)</td></tr>
<tr class="memdesc:gabfecbe6df690a2a10194920ba7db8d3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable an AON timer alarm for a specified calendar date/time.  <a href="group__pico__aon__timer.html#gabfecbe6df690a2a10194920ba7db8d3f">More...</a><br /></td></tr>
<tr class="separator:gabfecbe6df690a2a10194920ba7db8d3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga20cda0289aab2eb5fda914704a1fc2a7"><td class="memItemLeft" align="right" valign="top"><a id="ga20cda0289aab2eb5fda914704a1fc2a7" name="ga20cda0289aab2eb5fda914704a1fc2a7"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>aon_timer_disable_alarm</b> (void)</td></tr>
<tr class="memdesc:ga20cda0289aab2eb5fda914704a1fc2a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable the currently enabled AON timer alarm if any. <br /></td></tr>
<tr class="separator:ga20cda0289aab2eb5fda914704a1fc2a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga134ec8ae2a5f2a9b29b9bc4fb6c87493"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pico__aon__timer.html#ga134ec8ae2a5f2a9b29b9bc4fb6c87493">aon_timer_is_running</a> (void)</td></tr>
<tr class="memdesc:ga134ec8ae2a5f2a9b29b9bc4fb6c87493"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable the currently enabled AON timer alarm if any.  <a href="group__pico__aon__timer.html#ga134ec8ae2a5f2a9b29b9bc4fb6c87493">More...</a><br /></td></tr>
<tr class="separator:ga134ec8ae2a5f2a9b29b9bc4fb6c87493"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p >High Level "Always on Timer" Abstraction. </p>
<p >This library uses the RTC on RP2040.   This library uses the Powman Timer on RP2350. </p>
<p >This library supports both <code>aon_timer_xxx_calendar()</code> methods which use a calendar date/time (as struct tm), and <code>aon_timer_xxx()</code> methods which use a linear time value relative an internal reference time (via struct timespec).</p>
<p ><a class="anchor" id="rp2040_caveats"></a>On RP2040 the non 'calendar date/time' methods must convert the linear time value to a calendar date/time internally; these methods are:</p>
<ul>
<li><a class="el" href="group__pico__aon__timer.html#ga32e4d69ae8c5b2048af84cf706b8b997">aon_timer_start_with_timeofday</a></li>
<li><a class="el" href="group__pico__aon__timer.html#ga1d9876f6ebad5960e8d7928b87d6b8ca">aon_timer_start</a></li>
<li><a class="el" href="group__pico__aon__timer.html#gaa9503489fbd3c6afc1d4e67e3c3ae1dc">aon_timer_set_time</a></li>
<li><a class="el" href="group__pico__aon__timer.html#ga48246c7cd89f2f599f9d3405d1b62185">aon_timer_get_time</a></li>
<li><a class="el" href="group__pico__aon__timer.html#ga39dab1da58c2f8178024b233e335d059">aon_timer_enable_alarm</a></li>
</ul>
<p >This conversion is handled by the <a class="el" href="group__util__datetime.html#ga318f32cb4c8cb86ddb9b8db05b81ea9d">pico_localtime_r</a> method. By default, this pulls in the C library <code>local_time_r</code> method which can lead to a big increase in binary size. The default implementation of <code>pico_localtime_r</code> is weak, so it can be overridden if a better/smaller alternative is available, otherwise you might consider the method variants ending in <code>_calendar()</code> instead on RP2040. </p>
<p ><a class="anchor" id="rp2350_caveats"></a>On RP2350 the 'calendar date/time' methods must convert the calendar date/time to a linear time value internally; these methods are:</p>
<ul>
<li><a class="el" href="group__pico__aon__timer.html#ga25e4ac9d9553d35646af544277ca9e4e">aon_timer_start_calendar</a></li>
<li><a class="el" href="group__pico__aon__timer.html#gae3b326fe02569768b09f37080f0d85e3">aon_timer_set_time_calendar</a></li>
<li><a class="el" href="group__pico__aon__timer.html#ga5ed3f772e4fcab66dadb7654f1fa47ef">aon_timer_get_time_calendar</a></li>
<li><a class="el" href="group__pico__aon__timer.html#gabfecbe6df690a2a10194920ba7db8d3f">aon_timer_enable_alarm_calendar</a></li>
</ul>
<p >This conversion is handled by the <a class="el" href="group__util__datetime.html#ga255a6ead98a3f641c09651a14a73f7bb">pico_mktime</a> method. By default, this pulls in the C library <code>mktime</code> method which can lead to a big increase in binary size. The default implementation of <code>pico_mktime</code> is weak, so it can be overridden if a better/smaller alternative is available, otherwise you might consider the method variants not ending in <code>_calendar()</code> instead on RP2350.  </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga39dab1da58c2f8178024b233e335d059" name="ga39dab1da58c2f8178024b233e335d059"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga39dab1da58c2f8178024b233e335d059">&#9670;&nbsp;</a></span>aon_timer_enable_alarm()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">aon_timer_alarm_handler_t aon_timer_enable_alarm </td>
          <td>(</td>
          <td class="paramtype">const struct timespec *&#160;</td>
          <td class="paramname"><em>ts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">aon_timer_alarm_handler_t&#160;</td>
          <td class="paramname"><em>handler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>wakeup_from_low_power</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable an AON timer alarm for a specified time. </p>
<p >On RP2350 the alarm will fire if it is in the past   On RP2040 the alarm will not fire if it is in the past.</p>
<p >See <a class="el" href="group__pico__aon__timer.html#rp2040_caveats">caveats</a> for using this method on RP2040 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ts</td><td>the alarm time </td></tr>
    <tr><td class="paramname">handler</td><td>a callback to call when the timer fires (can be NULL for wakeup_from_low_power = true) </td></tr>
    <tr><td class="paramname">wakeup_from_low_power</td><td>true if the AON timer is to be used to wake up from a DORMANT state </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>on success the old handler (or NULL if there was none) or PICO_ERROR_INVALID_ARG if internal time format conversion failed </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__util__datetime.html#ga318f32cb4c8cb86ddb9b8db05b81ea9d" title="localtime_r implementation for use by the pico_util datetime functions">pico_localtime_r</a> </dd></dl>

</div>
</div>
<a id="gabfecbe6df690a2a10194920ba7db8d3f" name="gabfecbe6df690a2a10194920ba7db8d3f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabfecbe6df690a2a10194920ba7db8d3f">&#9670;&nbsp;</a></span>aon_timer_enable_alarm_calendar()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">aon_timer_alarm_handler_t aon_timer_enable_alarm_calendar </td>
          <td>(</td>
          <td class="paramtype">const struct tm *&#160;</td>
          <td class="paramname"><em>tm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">aon_timer_alarm_handler_t&#160;</td>
          <td class="paramname"><em>handler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>wakeup_from_low_power</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable an AON timer alarm for a specified calendar date/time. </p>
<p >On RP2350 the alarm will fire if it is in the past</p>
<p >See <a class="el" href="group__pico__aon__timer.html#rp2350_caveats">caveats</a> for using this method on RP2350 </p>
<p >On RP2040 the alarm will not fire if it is in the past. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tm</td><td>the alarm calendar date/time </td></tr>
    <tr><td class="paramname">handler</td><td>a callback to call when the timer fires (can be NULL for wakeup_from_low_power = true) </td></tr>
    <tr><td class="paramname">wakeup_from_low_power</td><td>true if the AON timer is to be used to wake up from a DORMANT state </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>on success the old handler (or NULL if there was none) or PICO_ERROR_INVALID_ARG if internal time format conversion failed </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__util__datetime.html#ga318f32cb4c8cb86ddb9b8db05b81ea9d" title="localtime_r implementation for use by the pico_util datetime functions">pico_localtime_r</a> </dd></dl>

</div>
</div>
<a id="ga6e17d6adde0e3b25c70c04970116ccb8" name="ga6e17d6adde0e3b25c70c04970116ccb8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6e17d6adde0e3b25c70c04970116ccb8">&#9670;&nbsp;</a></span>aon_timer_get_resolution()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void aon_timer_get_resolution </td>
          <td>(</td>
          <td class="paramtype">struct timespec *&#160;</td>
          <td class="paramname"><em>ts</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the resolution of the AON timer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ts</td><td>out value for the resolution of the AON timer </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga48246c7cd89f2f599f9d3405d1b62185" name="ga48246c7cd89f2f599f9d3405d1b62185"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga48246c7cd89f2f599f9d3405d1b62185">&#9670;&nbsp;</a></span>aon_timer_get_time()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool aon_timer_get_time </td>
          <td>(</td>
          <td class="paramtype">struct timespec *&#160;</td>
          <td class="paramname"><em>ts</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the current time of the AON timer. </p>
<p >See <a class="el" href="group__pico__aon__timer.html#rp2040_caveats">caveats</a> for using this method on RP2040 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ts</td><td>out value for the current time </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on success, false if internal time format conversion failed </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__aon__timer.html#ga5ed3f772e4fcab66dadb7654f1fa47ef" title="Get the current time of the AON timer as a calendar date/time.">aon_timer_get_time_calendar</a> </dd></dl>

</div>
</div>
<a id="ga5ed3f772e4fcab66dadb7654f1fa47ef" name="ga5ed3f772e4fcab66dadb7654f1fa47ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5ed3f772e4fcab66dadb7654f1fa47ef">&#9670;&nbsp;</a></span>aon_timer_get_time_calendar()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool aon_timer_get_time_calendar </td>
          <td>(</td>
          <td class="paramtype">struct tm *&#160;</td>
          <td class="paramname"><em>tm</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the current time of the AON timer as a calendar date/time. </p>
<p >See <a class="el" href="group__pico__aon__timer.html#rp2350_caveats">caveats</a> for using this method on RP2350 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tm</td><td>out value for the current calendar date/time </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on success, false if internal time format conversion failed </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__aon__timer.html#ga48246c7cd89f2f599f9d3405d1b62185" title="Get the current time of the AON timer.">aon_timer_get_time</a> </dd></dl>

</div>
</div>
<a id="ga134ec8ae2a5f2a9b29b9bc4fb6c87493" name="ga134ec8ae2a5f2a9b29b9bc4fb6c87493"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga134ec8ae2a5f2a9b29b9bc4fb6c87493">&#9670;&nbsp;</a></span>aon_timer_is_running()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool aon_timer_is_running </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disable the currently enabled AON timer alarm if any. </p>
<dl class="section return"><dt>Returns</dt><dd>true if the AON timer is running </dd></dl>

</div>
</div>
<a id="gaa9503489fbd3c6afc1d4e67e3c3ae1dc" name="gaa9503489fbd3c6afc1d4e67e3c3ae1dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa9503489fbd3c6afc1d4e67e3c3ae1dc">&#9670;&nbsp;</a></span>aon_timer_set_time()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool aon_timer_set_time </td>
          <td>(</td>
          <td class="paramtype">const struct timespec *&#160;</td>
          <td class="paramname"><em>ts</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the current time of the AON timer. </p>
<p >See <a class="el" href="group__pico__aon__timer.html#rp2040_caveats">caveats</a> for using this method on RP2040 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ts</td><td>the new current time </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on success, false if internal time format conversion failed </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__aon__timer.html#gae3b326fe02569768b09f37080f0d85e3" title="Set the current time of the AON timer to the given calendar date/time.">aon_timer_set_time_calendar</a> </dd></dl>

</div>
</div>
<a id="gae3b326fe02569768b09f37080f0d85e3" name="gae3b326fe02569768b09f37080f0d85e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae3b326fe02569768b09f37080f0d85e3">&#9670;&nbsp;</a></span>aon_timer_set_time_calendar()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool aon_timer_set_time_calendar </td>
          <td>(</td>
          <td class="paramtype">const struct tm *&#160;</td>
          <td class="paramname"><em>tm</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the current time of the AON timer to the given calendar date/time. </p>
<p >See <a class="el" href="group__pico__aon__timer.html#rp2350_caveats">caveats</a> for using this method on RP2350 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tm</td><td>the new current time </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on success, false if internal time format conversion failed </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__aon__timer.html#gaa9503489fbd3c6afc1d4e67e3c3ae1dc" title="Set the current time of the AON timer.">aon_timer_set_time</a> </dd></dl>

</div>
</div>
<a id="ga1d9876f6ebad5960e8d7928b87d6b8ca" name="ga1d9876f6ebad5960e8d7928b87d6b8ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1d9876f6ebad5960e8d7928b87d6b8ca">&#9670;&nbsp;</a></span>aon_timer_start()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool aon_timer_start </td>
          <td>(</td>
          <td class="paramtype">const struct timespec *&#160;</td>
          <td class="paramname"><em>ts</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start the AON timer running using the specified timespec as the current time. </p>
<p >See <a class="el" href="group__pico__aon__timer.html#rp2040_caveats">caveats</a> for using this method on RP2040 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ts</td><td>the time to set as 'now' </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on success, false if internal time format conversion failed </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__aon__timer.html#ga25e4ac9d9553d35646af544277ca9e4e" title="Start the AON timer running using the specified calendar date/time as the current time.">aon_timer_start_calendar</a> </dd></dl>

</div>
</div>
<a id="ga25e4ac9d9553d35646af544277ca9e4e" name="ga25e4ac9d9553d35646af544277ca9e4e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga25e4ac9d9553d35646af544277ca9e4e">&#9670;&nbsp;</a></span>aon_timer_start_calendar()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool aon_timer_start_calendar </td>
          <td>(</td>
          <td class="paramtype">const struct tm *&#160;</td>
          <td class="paramname"><em>tm</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start the AON timer running using the specified calendar date/time as the current time. </p>
<p >See <a class="el" href="group__pico__aon__timer.html#rp2350_caveats">caveats</a> for using this method on RP2350 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tm</td><td>the calendar date/time to set as 'now' </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on success, false if internal time format conversion failed </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__pico__aon__timer.html#ga1d9876f6ebad5960e8d7928b87d6b8ca" title="Start the AON timer running using the specified timespec as the current time.">aon_timer_start</a> </dd></dl>

</div>
</div>
<a id="ga32e4d69ae8c5b2048af84cf706b8b997" name="ga32e4d69ae8c5b2048af84cf706b8b997"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga32e4d69ae8c5b2048af84cf706b8b997">&#9670;&nbsp;</a></span>aon_timer_start_with_timeofday()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void aon_timer_start_with_timeofday </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start the AON timer running using the result from the gettimeofday() function as the current time. </p>
<p >See <a class="el" href="group__pico__aon__timer.html#rp2040_caveats">caveats</a> for using this method on RP2040  </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->

	<script src="main.js"></script>
</body>
</html>